# -*- coding: utf-8 -*-
# Created by Administrator on 2020/6/21
# Copyright (c) 2020 Administrator. All rights reserved.

from django import forms


class BootStrapModelForm(forms.ModelForm):
    def __init__(self, *args, **kwargs):
        super(BootStrapModelForm, self).__init__(*args, **kwargs)
        for name, field in self.fields.items():
            field.widget.attrs['class'] = 'form-control'
            field.widget.attrs['placeholder'] = field.label
